<template>
  <div class="suspend" @click="consult" :style="{top: (footTop ? (footTop - $parent.sTop + height < top ? footTop - $parent.sTop - height : top) : top) + 'px'}"></div>
</template>
<script>
export default {
  data() {
    return {
      top: 0,
      height: 0
    }
  },
  props: ['footTop'],
  mounted() {
    this.top = document.body.clientHeight - parseFloat(window.getComputedStyle(document.documentElement)["fontSize"]) * 0.21 - this.$el.clientHeight
    this.height = this.$el.clientHeight
  },
  methods: {
    consult() {
      location.href = 'https://qiyukf.com/client?k=3bb03a223ff45e6fc1e527ce74cd25e3&u=&d=elxhcgubcppxvblfv3bv&uuid=toevh0zihxwvonhknh3z&gid=0&sid=0&qtype=0&dvctimer=0&robotShuntSwitch=0&hc=0&robotId=0&t=%25E5%258C%2597%25E4%25BA%25AC%25E5%2590%2588%25E7%2590%2586%25E9%2581%25BF%25E7%25A8%258E_%25E5%258C%2597%25E4%25BA%25AC%25E4%25BC%2581%25E4%25B8%259A%25E9%2581%25BF%25E7%25A8%258E%25E8%258A%2582%25E7%25A8%258E_%25E5%258C%2597%25E4%25BA%25AC%25E7%25A8%258E%25E7%25AD%25B9%25E4%25BC%2598%25E5%258C%2596_%25E7%2588%25B1%25E5%2591%2598%25E5%25B7%25A5'
    }
  }
}
</script>
<style scoped>
.suspend{
    position: fixed;
    bottom: 8.21rem;
    right: 0.21rem;
    width: 0.89rem;
    height: 0.89rem;
    background-image: url('~@/assets/suspend.png');
    background-size: cover;
}
</style>
